<HTML>
<HEAD>
<TITLE>[Preface] About the Source Code</TITLE>
<META NAME="author" CONTENT="John Zukowski">
<META NAME="date" CONTENT="Thu Jul 31 14:20:02 1997">
<META NAME="form" CONTENT="html">
<META NAME="metadata" CONTENT="dublincore.0.1">
<META NAME="objecttype" CONTENT="book part">
<META NAME="otheragent" CONTENT="gmat dbtohtml">
<META NAME="publisher" CONTENT="O'Reilly &amp; Associates, Inc.">
<META NAME="source" CONTENT="SGML">
<META NAME="subject" CONTENT="Java AWT">
<META NAME="title" CONTENT="Java AWT">
<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">
</HEAD>
<body vlink="#551a8b" alink="#ff0000" text="#000000" bgcolor="#FFFFFF" link="#0000ee">

<DIV CLASS=htmlnav>
<H1><a href='index.htm'><IMG SRC="gifs/smbanner.gif"
     ALT="Java AWT" border=0></a></H1>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch00_02.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><B><FONT FACE="ARIEL,HELVETICA,HELV,SANSERIF" SIZE="-1">Preface</FONT></B></TD>
<td width=172 align=right valign=top><A HREF="ch00_04.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
</table>

&nbsp;
<hr align=left width=515>
</DIV>
<DIV CLASS=sect1>
<h2 CLASS=sect1><A CLASS="TITLE" NAME="JAWT-PREF-SECT-3">About the Source Code</A></h2>

<P CLASS=para>
The source code for the programs presented in this book is available online. 
See <A HREF="http://www.ora.com/catalog/javawt/">http://www.ora.com/catalog/javawt/</A> 
for downloading instructions. 

<DIV CLASS=sect2>
<h3 CLASS=sect2><A CLASS="TITLE" NAME="JAWT-PREF-SECT-3.1">Obtaining the Example Programs</A></h3>

<P CLASS=para>
The example programs in this book are available electronically
in a number of ways: by FTP, Ftpmail,
BITFTP, and UUCP. The
cheapest, fastest, and easiest ways are listed first. If
you read from the top down, the first one that works for you is
probably the best. Use FTP if you are directly on the
Internet. Use Ftpmail if you are not on the Internet but can send
and receive electronic mail to Internet sites (this includes
CompuServe users). Use BITFTP if you send electronic mail via BITNET.
Use UUCP if none of the above works.

<DIV CLASS=sect3>
<h4 CLASS=sect3><A CLASS="TITLE" NAME="JAWT-PREF-SECT-3.1.1">FTP</A></h4>

<P CLASS=para>
 
To use FTP, you need a machine with direct access to the
Internet. A sample session is shown, with what you should type in
<tt CLASS=userinput>boldface</tt>.

<DIV CLASS=screen>
<P>
<PRE>
% <tt CLASS=userinput>ftp ftp.ora.com</tt>
Connected to ftp.ora.com.
220 FTP server (Version 6.21 Tue Mar 10 22:09:55 EST 1992) ready.
Name (ftp.ora.com:yourname): <tt CLASS=userinput>anonymous</tt>
331 Guest login ok, send domain style e-mail address as password.
Password: <tt CLASS=userinput>yourname@yourhost.com</tt> (use your user name and host here)
230 Guest login ok, access restrictions apply.
ftp&gt; <tt CLASS=userinput>cd /published/oreilly/java/awt</tt>
250 CWD command successful.
ftp&gt; <tt CLASS=userinput>binary</tt> (Very important! You must specify binary transfer for compressed files.)
200 Type set to I.
ftp&gt; <tt CLASS=userinput>get examples.tar.gz</tt>
200 PORT command successful.
150 Opening BINARY mode data connection for examples.tar.gz.
226 Transfer complete.
ftp&gt; <tt CLASS=userinput>quit</tt>
221 Goodbye.
%
</PRE>
</DIV>

<P CLASS=para>
The file is a compressed <i CLASS=command>tar</i> archive; extract the files
from the archive by typing:

<DIV CLASS=screen>
<P>
<PRE>
% <tt CLASS=userinput>zcat examples.tar.gz | tar xvf -</tt>
</PRE>
</DIV>

<P CLASS=para>
System V systems require the following <i CLASS=command>tar</i> command instead:

<DIV CLASS=screen>
<P>
<PRE>
% <tt CLASS=userinput>zcat examples.tar.gz | tar xof -</tt>
</PRE>
</DIV>

<P CLASS=para>
If <I CLASS=emphasis>zcat</I> is not available on your system, use separate
<I CLASS=emphasis>gunzip</I> and <I CLASS=emphasis>tar</I> commands.

<DIV CLASS=screen>
<P>
<PRE>
% <tt CLASS=userinput>gunzip examples.tar.gz</tt>
% <tt CLASS=userinput>tar xvf examples.tar</tt>
</PRE>
</DIV>

</DIV>

<DIV CLASS=sect3>
<h4 CLASS=sect3><A CLASS="TITLE" NAME="JAWT-PREF-SECT-3.1.2">Ftpmail</A></h4>

<P CLASS=para>
 
Ftpmail is a mail server available to anyone who can
send electronic
mail to, and receive it from, Internet sites. This includes any company
or service provider that allows email connections to the Internet. Here's
how you do it.

<P CLASS=para>
You send mail to <I CLASS=emphasis>ftpmail@online.ora.com</I>. (Be sure
to address the message to <I CLASS=emphasis>ftpmail</I> and not to
<I CLASS=emphasis>ftp</I>.) In the message body,
give the FTP commands you want to run. The server will run anonymous
FTP for you and mail the files back to you. To get a complete help file,
send a message with no subject and the single word "help" in the
body.
The following is a sample mail session that should get you the examples.
This command sends you a listing of the files in the selected directory
and the requested example files. The listing is useful if there's a later
version of the examples you're interested in.

<DIV CLASS=screen>
<P>
<PRE>
% <tt CLASS=userinput>mail ftpmail@online.ora.com</tt>
Subject:
<tt CLASS=userinput>reply-to yourname@yourhost.com</tt>    Where you want files mailed
<tt CLASS=userinput>open
cd /published/oreilly/java/awt
dir
mode binary
uuencode
get examples.tar.gz
quit
.</tt>
</PRE>
</DIV>

<P CLASS=para>
A signature at the end of the message is acceptable as long as it
appears after "quit."

</DIV>

<DIV CLASS=sect3>
<h4 CLASS=sect3><A CLASS="TITLE" NAME="JAWT-PREF-SECT-3.1.3">BITFTP</A></h4>

<P CLASS=para>
 
BITFTP is a mail server for BITNET users. You send it
electronic mail messages requesting files, and it sends you back
the files by electronic mail. BITFTP currently serves only
users who send it mail from nodes that are directly on
BITNET, EARN, or NetNorth. BITFTP is a public service
of Princeton
University. Here's how it works.

<P CLASS=para>
To use BITFTP, send mail containing your FTP commands to
<I class=emphasis>BITFTP@PUCC</I>. For a complete help
file, send HELP as the message body.

<P CLASS=para>
The following is the message body you send to BITFTP:

<DIV CLASS=screen>
<P>
<PRE>
<tt CLASS=userinput>FTP  ftp.uu.net  NETDATA
USER  anonymous
PASS  yourname@yourhost.edu</tt> Put your Internet email address here (not your BITNET address)
<tt CLASS=userinput>CD</tt>  <tt CLASS=userinput>/published/oreilly/java/awt</tt>
<tt CLASS=userinput>DIR
BINARY
GET</tt>  <tt CLASS=userinput>examples.tar.gz</tt>
<tt CLASS=userinput>QUIT</tt>
</PRE>
</DIV>

<P CLASS=para>
Once you've got the desired file, follow the directions under FTP
to extract the files from the archive. Since you are probably not
on a UNIX system, you may need to get versions of <I CLASS=emphasis>uudecode</I>,
<I CLASS=emphasis>uncompress</I>, <I CLASS=emphasis>atob</I>, and <I CLASS=emphasis>tar</I> for your system.
VMS, DOS, and Mac versions are available. The VMS versions
are on <I CLASS=emphasis>gatekeeper.dec.com</I> in <I CLASS=emphasis>/pub/VMS</I>.

</DIV>

<DIV CLASS=sect3>
<h4 CLASS=sect3><A CLASS="TITLE" NAME="JAWT-PREF-SECT-3.1.4">UUCP</A></h4>

<P CLASS=para>
 
UUCP is standard on virtually all UNIX
systems and is available for
IBM-compatible PCs and Apple Macintoshes.
The examples are available by UUCP via modem from UUNET; UUNET's
connect-time charges apply.

<P CLASS=para>
If you or your company has an account with
UUNET, you have a system somewhere
with a direct UUCP connection to
UUNET. Find that system, and type:

<DIV CLASS=screen>
<P>
<PRE>
<tt CLASS=userinput>uucp uunet\!~/published/oreilly/java/awt/examples.tar.gz</tt> <tt CLASS=replaceable><i>yourhost</i></tt><tt CLASS=userinput>\!~/</tt><tt CLASS=replaceable><i>yourname</i></tt><tt CLASS=userinput>/</tt>
</PRE>
</DIV>

<P CLASS=para>
The backslashes can be omitted if you use the Bourne shell (<I CLASS=emphasis>sh</I>)
instead of <I CLASS=emphasis>csh</I>. The file should appear some time later (up to a
day or more) in the directory
<i CLASS=filename>/usr/spool/uucppublic/</i><tt CLASS=replaceable><i>yourname</i></tt>.
If you don't have an account, but would like one so that you can
get electronic mail, contact UUNET at 703-204-8000.

<P CLASS=para>
Once you've got the desired file, follow the directions under FTP
to extract the files from the archive.

</DIV>

</DIV>

</DIV>


<DIV CLASS=htmlnav>

<P>
<HR align=left width=515>
<table width=515 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=172 align=left valign=top><A HREF="ch00_02.htm"><IMG SRC="gifs/txtpreva.gif" ALT="Previous" border=0></A></td>
<td width=171 align=center valign=top><a href="index.htm"><img src='gifs/txthome.gif' border=0 alt='Home'></a></td>
<td width=172 align=right valign=top><A HREF="ch00_04.htm"><IMG SRC="gifs/txtnexta.gif" ALT="Next" border=0></A></td>
</tr>
<tr>
<td width=172 align=left valign=top>What This Book Covers</td>
<td width=171 align=center valign=top><a href="index/idx_a.htm"><img src='gifs/index.gif' alt='Book Index' border=0></a></td>
<td width=172 align=right valign=top>Other Java Books and Resources</td>
</tr>
</table>
<hr align=left width=515>

<IMG SRC="gifs/smnavbar.gif" USEMAP="#map" BORDER=0> 
<MAP NAME="map"> 
<AREA SHAPE=RECT COORDS="0,0,108,15" HREF="../javanut/index.htm"
alt="Java in a Nutshell"> 
<AREA SHAPE=RECT COORDS="109,0,200,15" HREF="../langref/index.htm" 
alt="Java Language Reference"> 
<AREA SHAPE=RECT COORDS="203,0,290,15" HREF="../awt/index.htm" 
alt="Java AWT"> 
<AREA SHAPE=RECT COORDS="291,0,419,15" HREF="../fclass/index.htm" 
alt="Java Fundamental Classes"> 
<AREA SHAPE=RECT COORDS="421,0,514,15" HREF="../exp/index.htm" 
alt="Exploring Java"> 
</MAP>
</DIV>

</BODY>
</HTML>
